import {AbstractService} from "./abstractService";
import {apiConfig, httpServer} from "../serverConfig/serverManager";

export class ChatService extends AbstractService {
  constructor() {
    super();
  }

  sendMessage(message) {
    const cmd = apiConfig.chat.sendMsg;
    const data = {
      message: message
    }
    return httpServer.getData(cmd, data).then(res => res.data)
  }

  receiveMessage() {
    const cmd = apiConfig.chat.receiveMsg;
    return httpServer.getData(cmd, null).then(res => res.data)
  }
}
